package cn.juque.jdfsystem.disruptor.event;

import cn.juque.common.base.DisruptorBody;
import cn.juque.common.disruptor.IBusinessEventService;
import cn.juque.jdfsystem.task.ClearHotFileTask;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author juque
 * @version 1.0.0
 * <ul>
 *     <li>ClearHotFileInfoDisruptorEventServiceImpl</li>
 * </ul>
 * @date 2023-01-13 11:19:39
 **/
@Service("clearHotFileInfoDisruptorEventService")
public class ClearHotFileInfoDisruptorEventServiceImpl implements IBusinessEventService {

    public static final String BEAN = "clearHotFileInfoDisruptorEventService";

    @Resource
    private ClearHotFileTask clearHotFileTask;

    /**
     * 具体消费者的实现
     *
     * @param disruptorBody 消息体
     */
    @Override
    public void invoke(DisruptorBody disruptorBody) {
        this.clearHotFileTask.start(null);
    }
}
